package easy;

public class test1 {
    // https://leetcode.cn/problems/two-sum/submissions/680432435/
    /*
    public int[] twoSum(int[] nums, int target) {
        int[] ret=new int[2];
        HashMap<Integer,Integer> map=new HashMap<>();
        for(int i=0;i<nums.length;i++) {
            int num1=nums[i];
            int num2=target-num1;
            if(map.containsKey(num2)) {
                ret[0]=i;
                ret[1]=map.get(num2);
                return ret;
            } else {
                // 将当前元素及其下标的映射放入哈希表中
                map.put(num1,i);
            }
        }
        return ret;
    }
     */

}
